<template>
  <div class="common-layout">
    <el-container>
      <el-aside style="width: 200px;">
        <router-link to="/body">
          <img src="https://wyh-777.oss-cn-nanjing.aliyuncs.com/QQ%E5%9B%BE%E7%89%8720230522140608.jpg"
            alt="ssm-cluster Logo" class="brand-image img-circle elevation-3"
            style="opacity: .8;width: 150px;left: 25px;"></router-link>
        <Menu :theme="theme" active-name="1" style="height: 100vh;">
          <MenuGroup title="首页">
            <MenuItem name="1" @click="index">
            <Icon type="md-document" />
            商城介绍
            </MenuItem>
            <MenuItem name="2" @click="addGoods">
            <Icon type="md-chatbubbles" />
            添加商品
            </MenuItem>
          </MenuGroup>
          <MenuGroup title="首页配置">
            <MenuItem name="3" @click="swiper">
            <Icon type="md-document" />
            轮播图配置
            </MenuItem>
            <MenuItem name="4" @click="newGoods">
            <Icon type="md-chatbubbles" />
            新品上线配置
            </MenuItem>
            <MenuItem name="5" @click="recommend">
            <Icon type="md-heart" />
            为你推荐配置
            </MenuItem>
          </MenuGroup>
          <MenuGroup title="管理模块">
            <MenuItem name="6" @click="category">
            <Icon type="md-leaf" />
            分类管理
            </MenuItem>
            <MenuItem name="7" @click="showgoods">
            <Icon type="md-heart" />
            商品管理
            </MenuItem>
            <MenuItem name="8" @click="guest">
            <Icon type="md-leaf" />
            用户管理
            </MenuItem>
            <MenuItem name="9" @click="order">
            <Icon type="md-leaf" />
            订单管理
            </MenuItem>
          </MenuGroup>
          <MenuGroup title="系统管理">
            <MenuItem name="10">
            <Icon type="md-leaf" />
            安全退出
            </MenuItem>
          </MenuGroup>

        </Menu>
        <br>
      </el-aside>

      <el-main>
        <RouterView></RouterView>
      </el-main>
    </el-container>
  </div>
</template>

<script>

export default {
  data() {
    return {

    }
  },
  methods: {
    index() {
      this.$router.push('/admin/index2')
    },
    addGoods() {
      this.$router.push('/admin/add')
    },
    swiper() {
      this.$router.push('/admin/swiper')
    },
    showgoods() {
      this.$router.push('/admin/goods')
    },
    category() {
      this.$router.push('/admin/category')
    },
    guest() {
      this.$router.push('/admin/guest')
    }, order() {
      this.$router.push('/admin/order')
    },
    newGoods() {
      this.$router.push('/admin/new')
    },
    recommend() {
      this.$router.push('/admin/recommend')
    },

  }
}
</script>

<style scoped></style>